home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
Other Langs
/
MacPerl ƒ
/
Perl Source ƒ
/
Perl
/
t
/
mac
/
StandardFile.t
< prev
Wrap
Text File
|
1994-01-06
|
903b
|
27 lines
#!/usr/bin/perl
require "StandardFile.pl";
$| = 1;
print "Current Folder: ", `pwd`;
$filename = &StandardFile'GetFile("Please choose a file:", "TEXT", "OBJ ", "::");
print ($filename ? "You chose:\n$filename\n" : "You cancelled\n");
$filename = &StandardFile'GetFile("TEXT");
print ($filename ? "You chose:\n$filename\n" : "You cancelled\n");
$filename = &StandardFile'PutFile("Select New File");
print ($filename ? "You typed:\n$filename\n" : "You cancelled\n");
print "Current Folder: ", `pwd`;
$filename = &StandardFile'GetNewFile("Select New File", "::Titled");
print ($filename ? "You typed:\n$filename\n" : "You cancelled\n");
print "Current Folder: ", `pwd`;
$dirname = &StandardFile'GetFolder("Gimme a folder", ":::");
print ($dirname ? "You chose:\n$dirname\n" : "You cancelled\n");
$dirname = &StandardFile'GetFolder();
print ($dirname ? "You chose:\n$dirname\n" : "You cancelled\n");